package com.lovejes.jesacl.domain.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the ACLROLE table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="ACLROLE"
   @preserve all
 */

public abstract class BaseAclrole  implements Serializable {

	public static String REF = "Aclrole";
	public static String PROP_RK = "Rk";
	public static String PROP_RNAME = "Rname";
	public static String PROP_PID = "Pid";
	public static String PROP_RCODE = "Rcode";
	public static String PROP_ID = "Id";
	public static String PROP_IDX = "Idx";


	// constructors
	public BaseAclrole () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseAclrole (java.lang.String id) {
		this.setId(id);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.String id;

	// fields
	private java.lang.String pid;
	private java.lang.String rname;
	private java.lang.String rcode;
	private java.lang.String rk;
	private java.lang.Integer idx;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="uuid"
     *  column="ID"
     */
	public java.lang.String getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 */
	public void setId (java.lang.String id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: PID
	 */
	public java.lang.String getPid () {
		return pid;
	}

	/**
	 * Set the value related to the column: PID
	 * @param pid the PID value
	 */
	public void setPid (java.lang.String pid) {
		this.pid = pid;
	}



	/**
	 * Return the value associated with the column: RNAME
	 */
	public java.lang.String getRname () {
		return rname;
	}

	/**
	 * Set the value related to the column: RNAME
	 * @param rname the RNAME value
	 */
	public void setRname (java.lang.String rname) {
		this.rname = rname;
	}



	/**
	 * Return the value associated with the column: RCODE
	 */
	public java.lang.String getRcode () {
		return rcode;
	}

	/**
	 * Set the value related to the column: RCODE
	 * @param rcode the RCODE value
	 */
	public void setRcode (java.lang.String rcode) {
		this.rcode = rcode;
	}



	/**
	 * Return the value associated with the column: RK
	 */
	public java.lang.String getRk () {
		return rk;
	}

	/**
	 * Set the value related to the column: RK
	 * @param rk the RK value
	 */
	public void setRk (java.lang.String rk) {
		this.rk = rk;
	}



	/**
	 * Return the value associated with the column: IDX
	 */
	public java.lang.Integer getIdx () {
		return idx;
	}

	/**
	 * Set the value related to the column: IDX
	 * @param idx the IDX value
	 */
	public void setIdx (java.lang.Integer idx) {
		this.idx = idx;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.lovejes.jesacl.domain.Aclrole)) return false;
		else {
			com.lovejes.jesacl.domain.Aclrole aclrole = (com.lovejes.jesacl.domain.Aclrole) obj;
			if (null == this.getId() || null == aclrole.getId()) return false;
			else return (this.getId().equals(aclrole.getId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}